
-------------------- GRID VIEW - COLUMNS: NAME, DESCRIPTION, PARENT CATEGORY  ---------------
DELETE [dbo].[GRIDVIEWS] WHERE NAME='Callback.ListView'
INSERT INTO [dbo].[GRIDVIEWS]([ID], [DELETED], [CREATED_BY], [DATE_ENTERED], [MODIFIED_USER_ID], [DATE_MODIFIED], [DATE_MODIFIED_UTC], [NAME], [MODULE_NAME], [VIEW_NAME], [PRE_LOAD_EVENT_ID], [POST_LOAD_EVENT_ID])
SELECT N'943A8CA9-D8E5-4CC8-B64C-E0F49AC82B19', 0, NULL, getdate(), N'00000000-0000-0000-0000-000000000001', getdate(), getdate(), N'Callback.ListView', N'Callback', N'vwCallback_List', NULL, NULL
GO
delete [dbo].[GRIDVIEWS_COLUMNS] where grid_name='Callback.ListView'
go
INSERT INTO [dbo].[GRIDVIEWS_COLUMNS]([ID], [DELETED], [CREATED_BY], [DATE_ENTERED], [MODIFIED_USER_ID], [DATE_MODIFIED], [DATE_MODIFIED_UTC], [GRID_NAME], [COLUMN_INDEX], [COLUMN_TYPE], [DEFAULT_VIEW], [HEADER_TEXT], [SORT_EXPRESSION], [ITEMSTYLE_WIDTH], [ITEMSTYLE_CSSCLASS], [ITEMSTYLE_HORIZONTAL_ALIGN], [ITEMSTYLE_VERTICAL_ALIGN], [ITEMSTYLE_WRAP], [DATA_FIELD], [DATA_FORMAT], [URL_FIELD], [URL_FORMAT], [URL_TARGET], [LIST_NAME], [URL_MODULE], [URL_ASSIGNED_FIELD], [MODULE_TYPE], [PARENT_FIELD])
SELECT N'0C52A849-1031-4777-9F1C-E57D8A84BF3E', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 3, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_CreatedTime', N'CreatedTime', N'10%', N'listViewTdLinkS1', NULL, NULL, 1		, N'CreatedTime', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'3B69343C-D5E0-40F9-A1DE-A851F309D720', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 1, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_CallingPhoneNumber', N'CallingPhoneNumber', N'10%', N'listViewTdLinkS1', NULL, NULL, 1	, N'CallingPhoneNumber', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'A314EB7D-EB1B-4EE6-8869-916995B20535', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 2, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_CallbackPhoneNumber', N'CallbackPhoneNumber', N'10%', N'listViewTdLinkS1', NULL, NULL, 1, N'CallbackPhoneNumber', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'9E249093-F0A6-4CE9-AC9F-595300BB682A', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 4, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_SysStatus', N'SysStatus', N'10%', N'listViewTdLinkS1', NULL, NULL, 1			, N'SysStatus', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'C08F2DFB-C99B-4456-B366-B347E6ABF27D', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 5, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_Status', N'Status', N'10%', N'listViewTdLinkS1', NULL, NULL, 1				, N'Status', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'6E39BCD5-AA2F-4BB4-84F3-D0BDDBD8F292', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 6, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_Result', N'Result', N'10%', N'listViewTdLinkS1', NULL, NULL, 1				, N'Result', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'5D70B6A6-BFBD-408C-9A4C-7CF581D6C795', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 7, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_AgentID', N'AgentID', N'10%', N'listViewTdLinkS1', NULL, NULL, 1			, N'AgentID', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'F1D2D456-8FDB-4164-97B1-2E3A3F8BA2F9', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 8, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_Station', N'Station', N'10%', N'listViewTdLinkS1', NULL, NULL, 1			, N'Station', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'09D42220-21E4-4A2C-939A-D1B719C13210', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView', 9, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_MessageUrl', N'MessageUrl', N'10%', N'listViewTdLinkS1', NULL, NULL, 1			, N'MessageUrl', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'E8AAB022-3BCE-4D56-9C5A-BBEF37BB5ECA', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView',10, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_Tries', N'Tries', N'5%', N'listViewTdLinkS1', NULL, NULL, 1				, N'Tries', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'4E835045-AE5D-4E15-84E2-D6EA31A23328', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView',11, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_TelephonyPort', N'TelephonyPort', N'10%', N'listViewTdLinkS1', NULL, NULL, 1		, N'TelephonyPort', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL UNION ALL
SELECT N'7669B97C-AE37-45B3-B66E-A9E10187F5AA', 0, NULL, getdate(), NULL, getdate(),getdate(), N'Callback.ListView',12, N'TemplateColumn', 0, N'Callback.LNK_CALLBACK_LIST_LastUpdateTime', N'LastUpdateTime', N'10%', N'listViewTdLinkS1', NULL, NULL, 1		, N'LastUpdateTime', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL 
GO 
delete TERMINOLOGY where ID='6C959887-48FB-4228-A1EE-9405964DC690'
go
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('6C959887-48FB-4228-A1EE-9405964DC690','Callback','LBL_LIST_FORM_TITLE','CALLBACK LIST','en-US',0,getdate(),getdate(),getdate(),null,50)
GO 
delete TERMINOLOGY where ID='47886274-8E97-4A1C-931D-9795E93D51EA'
go
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('47886274-8E97-4A1C-931D-9795E93D51EA','Callback','LNK_CALLBACK_LIST_Note','Note','en-US',0,getdate(),getdate(),getdate(),null,50)

GO
delete TERMINOLOGY where ID='676B6A31-6C33-4A20-8394-A8BBEE055BB2'
GO
delete TERMINOLOGY where ID='9BCCDEEA-DFF4-4C14-9003-6658588DA93A'
GO
delete TERMINOLOGY where ID='6D725CF6-0DCF-444E-A8D3-E4D29124D089' 
GO
delete TERMINOLOGY where ID='337299B2-830A-46FE-9ABB-9F6928EA9560' 
GO
delete TERMINOLOGY where ID='BA1FBE2A-5F06-4914-8843-C64E35660166' 
GO
delete TERMINOLOGY where ID='4C9B16B2-236E-4CE4-848F-284C0CF2B4C6' 
GO
delete TERMINOLOGY where ID='9DE85D45-C3E9-46E3-A416-F1970299D41D' 
GO
delete TERMINOLOGY where ID='8E84BA83-4427-4572-B15E-AC98B6727EF0' 
GO
delete TERMINOLOGY where ID='DDA80EAC-F49D-4899-9AE5-A2A4DAAAAD85' 
GO
delete TERMINOLOGY where ID='5A4CE2E1-9358-44B1-A55E-A63F0E4771B0' 
GO
delete TERMINOLOGY where ID='DCB04293-80AF-4A51-92A3-2ECB6B719745' 
GO
delete TERMINOLOGY where ID='20A10B83-0AC4-409D-AD7F-1FE358D4841A' 
GO
delete TERMINOLOGY where ID='0F0D9077-2DF9-4C65-95A3-426DD04F0C23' 
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('9BCCDEEA-DFF4-4C14-9003-6658588DA93A','Callback','LNK_CALLBACK_LIST_CreatedTime','Created','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('6D725CF6-0DCF-444E-A8D3-E4D29124D089','Callback','LNK_CALLBACK_LIST_CallingPhoneNumber','Calling Phone ','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('337299B2-830A-46FE-9ABB-9F6928EA9560','Callback','LNK_CALLBACK_LIST_CallbackPhoneNumber','Callback Phone','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('BA1FBE2A-5F06-4914-8843-C64E35660166','Callback','LNK_CALLBACK_LIST_SysStatus','SysStatus','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('4C9B16B2-236E-4CE4-848F-284C0CF2B4C6','Callback','LNK_CALLBACK_LIST_Status','Status','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('9DE85D45-C3E9-46E3-A416-F1970299D41D','Callback','LNK_CALLBACK_LIST_Result','Result','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('8E84BA83-4427-4572-B15E-AC98B6727EF0','Callback','LNK_CALLBACK_LIST_AgentID','AgentID','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)
VALUES ('DDA80EAC-F49D-4899-9AE5-A2A4DAAAAD85','Callback','LNK_CALLBACK_LIST_LastUpdateTime','Last Update','en-US',0,getdate(),getdate(),getdate(),null,50)      
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)      
VALUES ('5A4CE2E1-9358-44B1-A55E-A63F0E4771B0','Callback','LNK_CALLBACK_LIST_MessageUrl','MessageUrl','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)      
VALUES ('DCB04293-80AF-4A51-92A3-2ECB6B719745','Callback','LNK_CALLBACK_LIST_Tries','Tries','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)      
VALUES ('20A10B83-0AC4-409D-AD7F-1FE358D4841A','Callback','LNK_CALLBACK_LIST_TelephonyPort','Telephony Port','en-US',0,getdate(),getdate(),getdate(),null,50)
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)      
VALUES ('0F0D9077-2DF9-4C65-95A3-426DD04F0C23','Callback','LNK_CALLBACK_LIST_LastUpdateTime','Last Update','en-US',0,getdate(),getdate(),getdate(),null,50) 
GO
INSERT INTO [dbo].[TERMINOLOGY] (ID,[MODULE_NAME],[NAME],[DISPLAY_NAME],[LANG],[DELETED],[DATE_ENTERED],[DATE_MODIFIED],[DATE_MODIFIED_UTC],[LIST_NAME],LIST_ORDER)      
VALUES ('676B6A31-6C33-4A20-8394-A8BBEE055BB2','Callback','LNK_CALLBACK_LIST_Station','Station','en-US',0,getdate(),getdate(),getdate(),null,50)
------------------- DATABASE-VIEW: LIST VIEW  ---------------
if (object_id('vwCallback_List') is not null)
drop view [dbo].[vwCallback_List]
go
CREATE VIEW [dbo].[vwCallback_List]
AS
SELECT [ID]
      ,[CreatedTime]
      ,[CallingPhoneNumber]
      ,[CallbackPhoneNumber]
      ,[SysStatus]
      ,[Status]
      ,[Result]
      ,[AgentID]
      ,[Station]
      ,[MessageUrl]
      ,[Tries]
      ,[TelephonyPort]
      ,[LastUpdateTime]
      ,[Note]
  FROM [dbo].[Callbacks] 
go
